mixin input(title, type, id, value)
  - var inputType = 'text'
  if type === 'number' || type === 'integer'
    - inputType = 'number'
  if type.match(/-vector$/) || type === 'region'
    - value = value.join(',')
  input.form-control(name=title, type=inputType, id=id, value=value)&attributes(attributes)

.form-group.g-control-item(data-type=type, data-control-id=id)
  block label
    label.g-control-widget-label.control-label(for=id)= title
  block description
    if description
      .g-control-widget-description= description
  block input
    +input(title, type, id, value)(min=min, max=max, step=step)
